﻿#ifndef PST_SCALARBARSETTING_H
#define PST_SCALARBARSETTING_H

#include <QWidget>
QT_BEGIN_NAMESPACE
namespace Ui { class ScalarBarSetting; };
QT_END_NAMESPACE

class QLineEdit;
class QComboBox;
class QCheckBox;

namespace BaseWidget
{
    class DoubleSpinBox;
    class EColorComboBox;
}

namespace pst
{
    class ScalarBarSetting : public QWidget
    {
        Q_OBJECT


    public:
        ScalarBarSetting(QWidget* parent = nullptr);
        ~ScalarBarSetting();

    public:
        void setTitle(const QString& title);
        QString getTitle() const;

        //void setFontFamily(const QString& fontFamily);
        //QString getFontFamily() const;

        void setFontSize(int fontSize);
        int getFontSize() const;

        void setMaxValue(double value);
        double getMaxValue() const;

        void setMinValue(double value);
        double getMinValue() const;

        void setUseScalarBarAutoRange(bool isAuto);
        bool getUseScalarBarAutoRange() const;

        void setIsShowTitle(bool isshow);
        bool getIsShowTitle() const;

        void setTitleColor(const QColor& color);
        QColor getTitleColor() const;

        void setOriginalScalarBarMinRange(double minValue);
        double getOriginalScalarBarMinRange() const;

        void setOriginalScalarBarMaxRange(double maxValue);
        double getOriginalScalarBarMaxRange() const;

    private:
        Ui::ScalarBarSetting* ui;
        QCheckBox* checkBoxAutoRange;
        QCheckBox* checkBoxShowTitle;
        QLineEdit* titleTextEdit;
        //QComboBox* comboBoxFontType;
        QComboBox* comboBoxFontSize;
        BaseWidget::EColorComboBox* comboBoxFontColor;
        BaseWidget::DoubleSpinBox* dSpinBoxMaxValue;
        BaseWidget::DoubleSpinBox* dSpinBoxMinValue;
        int m_rowCount;

        double m_scalarBarMinValueOriginal, m_scalarBarMaxValueOriginal;
    };
}

#endif
